<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Process a response for a basic COM_* command send to the client</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mysqlnduhconnection.simplecommand.html">MysqlndUhConnection::simpleCommand</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mysqlnduhconnection.sslset.html">MysqlndUhConnection::sslSet</a></div>
 <div class="up"><a href="class.mysqlnduhconnection.html">MysqlndUhConnection</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mysqlnduhconnection.simplecommandhandleresponse" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MysqlndUhConnection::simpleCommandHandleResponse</h1>
  <p class="verinfo">(PECL mysqlnd-uh &gt;= 1.0.0-alpha)</p><p class="refpurpose"><span class="refname">MysqlndUhConnection::simpleCommandHandleResponse</span> &mdash; <span class="dc-title">Process a response for a basic COM_* command send to the client</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqlnduhconnection.simplecommandhandleresponse-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>MysqlndUhConnection::simpleCommandHandleResponse</strong></span>
    ( <span class="methodparam"><span class="type"><span class="type mysqlnd_connection">mysqlnd_connection</span></span> <code class="parameter">$connection</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$ok_packet</code></span>
   , <span class="methodparam"><span class="type">bool</span> <code class="parameter">$silent</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$command</code></span>
   , <span class="methodparam"><span class="type">bool</span> <code class="parameter">$ignore_upsert_status</code></span>
   )</div>

  <p class="para rdfs-comment">
   Process a response for a basic COM_* command send to the client.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mysqlnduhconnection.simplecommandhandleresponse-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>
<em><code class="parameter">connection</code></em></dt>

    <dd>

     <p class="para">
      Mysqlnd connection handle. Do not modify!
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">ok_packet</code></em></dt>

    <dd>

     <p class="para">
      The OK packet type.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">silent</code></em></dt>

    <dd>

     <p class="para">
      Whether mysqlnd may emit errors.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">command</code></em></dt>

    <dd>

     <p class="para">
      The COM command to process results from.
     </p>
    </dd>

   
   
    <dt>
<em><code class="parameter">ignore_upsert_status</code></em></dt>

    <dd>

     <p class="para">
      Whether to ignore <em>UPDATE</em>/<em>INSERT</em> status.
     </p>
    </dd>

   
  </dl>

 </div>


<div class="refsect1 returnvalues" id="refsect1-mysqlnduhconnection.simplecommandhandleresponse-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success.
   Otherwise, returns <strong><code>FALSE</code></strong>
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-mysqlnduhconnection.simplecommandhandleresponse-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-1891">
    <p><strong>Example #1 <span class="function"><strong>MysqlndUhConnection::simpleCommandHandleResponse()</strong></span> example</strong></p>
        <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">server_cmd_2_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$command</span><span style="color: #007700">)&nbsp;{<br />&nbsp;</span><span style="color: #0000BB">$mapping&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_SLEEP&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_SLEEP"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_QUIT&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_QUIT"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_INIT_DB&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_INIT_DB"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_QUERY&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_QUERY"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_FIELD_LIST&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_FIELD_LIST"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_CREATE_DB&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_CREATE_DB"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_DROP_DB&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_DROP_DB"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_REFRESH&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_REFRESH"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_SHUTDOWN&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_SHUTDOWN"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_STATISTICS&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_STATISTICS"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_PROCESS_INFO&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_PROCESS_INFO"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_CONNECT&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_CONNECT"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_PROCESS_KILL&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_PROCESS_KILL"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_DEBUG&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_DEBUG"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_PING&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_PING"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_TIME&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_TIME"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_DELAYED_INSERT&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_DELAYED_INSERT"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_CHANGE_USER&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_CHANGE_USER"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_BINLOG_DUMP&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_BINLOG_DUMP"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_TABLE_DUMP&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_TABLE_DUMP"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_CONNECT_OUT&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_CONNECT_OUT"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_REGISTER_SLAVED&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_REGISTER_SLAVED"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_STMT_PREPARE&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_STMT_PREPARE"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_STMT_EXECUTE&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_STMT_EXECUTE"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_STMT_SEND_LONG_DATA&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_STMT_SEND_LONG_DATA"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_STMT_CLOSE&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_STMT_CLOSE"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_STMT_RESET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_STMT_RESET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_SET_OPTION&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_SET_OPTION"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_STMT_FETCH&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_STMT_FETCH"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_DAEMON&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_DAEMON"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_COM_END&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_COM_END"</span><span style="color: #007700">,<br />&nbsp;);<br />&nbsp;return&nbsp;(isset(</span><span style="color: #0000BB">$mapping</span><span style="color: #007700">[</span><span style="color: #0000BB">$command</span><span style="color: #007700">]))&nbsp;?&nbsp;</span><span style="color: #0000BB">$mapping</span><span style="color: #007700">[</span><span style="color: #0000BB">$command</span><span style="color: #007700">]&nbsp;:&nbsp;</span><span style="color: #DD0000">'unknown'</span><span style="color: #007700">;<br />}<br /><br />function&nbsp;</span><span style="color: #0000BB">ok_packet_2_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$ok_packet</span><span style="color: #007700">)&nbsp;{<br />&nbsp;</span><span style="color: #0000BB">$mapping&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_GREET_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_GREET_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_AUTH_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_AUTH_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_OK_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_OK_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_EOF_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_EOF_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_CMD_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_CMD_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_RSET_HEADER_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_RSET_HEADER_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_RSET_FLD_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_RSET_FLD_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_ROW_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_ROW_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_STATS_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_STATS_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PREPARE_RESP_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PREPARE_RESP_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_CHG_USER_RESP_PACKET&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_CHG_USER_RESP_PACKET"</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #0000BB">MYSQLND_UH_MYSQLND_PROT_LAST&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"MYSQLND_UH_MYSQLND_PROT_LAST"</span><span style="color: #007700">,<br />&nbsp;);<br />&nbsp;return&nbsp;(isset(</span><span style="color: #0000BB">$mapping</span><span style="color: #007700">[</span><span style="color: #0000BB">$ok_packet</span><span style="color: #007700">]))&nbsp;?&nbsp;</span><span style="color: #0000BB">$mapping</span><span style="color: #007700">[</span><span style="color: #0000BB">$ok_packet</span><span style="color: #007700">]&nbsp;:&nbsp;</span><span style="color: #DD0000">'unknown'</span><span style="color: #007700">;<br />}<br /><br />class&nbsp;</span><span style="color: #0000BB">proxy&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">MysqlndUhConnection&nbsp;</span><span style="color: #007700">{<br />&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">simpleCommandHandleResponse</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$ok_packet</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$silent</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$command</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$ignore_upsert_status</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%s(%s)\n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">__METHOD__</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">var_export</span><span style="color: #007700">(</span><span style="color: #0000BB">func_get_args</span><span style="color: #007700">(),&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">));<br />&nbsp;&nbsp;</span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"Command&nbsp;'%s'\n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">server_cmd_2_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$command</span><span style="color: #007700">));<br />&nbsp;&nbsp;</span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"OK&nbsp;packet&nbsp;'%s'\n"</span><span style="color: #007700">,&nbsp;&nbsp;</span><span style="color: #0000BB">ok_packet_2_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$ok_packet</span><span style="color: #007700">));<br />&nbsp;&nbsp;</span><span style="color: #0000BB">$ret&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">parent</span><span style="color: #007700">::</span><span style="color: #0000BB">simpleCommandHandleResponse</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$ok_packet</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$silent</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$command</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$ignore_upsert_status</span><span style="color: #007700">);<br />&nbsp;&nbsp;</span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"%s&nbsp;returns&nbsp;%s\n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">__METHOD__</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">var_export</span><span style="color: #007700">(</span><span style="color: #0000BB">$ret</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">));<br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">$ret</span><span style="color: #007700">;<br />&nbsp;}<br />}<br /></span><span style="color: #0000BB">mysqlnd_uh_set_connection_proxy</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">proxy</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">$mysql&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"root"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;1&nbsp;FROM&nbsp;DUAL"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$mysql</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
proxy::simpleCommandHandleResponse(array (
  0 =&gt; NULL,
  1 =&gt; 5,
  2 =&gt; false,
  3 =&gt; 27,
  4 =&gt; true,
))
Command &#039;MYSQLND_UH_MYSQLND_COM_SET_OPTION&#039;
OK packet &#039;MYSQLND_UH_MYSQLND_PROT_EOF_PACKET&#039;
proxy::simpleCommandHandleResponse returns true
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mysqlnduhconnection.simplecommandhandleresponse-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member">
     <span class="function"><a href="function.mysqlnd-uh-set-connection-proxy.html" class="function" rel="rdfs-seeAlso">mysqlnd_uh_set_connection_proxy()</a> - Installs a proxy for mysqlnd connections</span>
    </li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mysqlnduhconnection.simplecommand.html">MysqlndUhConnection::simpleCommand</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mysqlnduhconnection.sslset.html">MysqlndUhConnection::sslSet</a></div>
 <div class="up"><a href="class.mysqlnduhconnection.html">MysqlndUhConnection</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
